I discovered that, with GTK4, when a vertical Box
contains a Picture
, and the width of the box is greater than that of the picture, the height of the box is set to maintain an aspect ratio that is the same as the picture’s:
I wanted to avoid that behaviour.
Horizontal box
The solution was to append the picture to a horizontal Box
with halign := AlignCenter
and append that box to the vertical box: